home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / x / gui / amiga / xnclds93.lha / os-include_x11.lha / os-include / X11 / extensions / multibufst.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-01-06  |  8.2 KB  |  268 lines

  1. /*
  2.  * $XConsortium: multibufst.h,v 1.7 91/01/05 16:32:49 rws Exp $
  3.  *
  4.  * Copyright 1989 Massachusetts Institute of Technology
  5.  *
  6.  * Permission to use, copy, modify, distribute, and sell this software and its
  7.  * documentation for any purpose is hereby granted without fee, provided that
  8.  * the above copyright notice appear in all copies and that both that
  9.  * copyright notice and this permission notice appear in supporting
  10.  * documentation, and that the name of M.I.T. not be used in advertising or
  11.  * publicity pertaining to distribution of the software without specific,
  12.  * written prior permission.  M.I.T. makes no representations about the
  13.  * suitability of this software for any purpose.  It is provided "as is"
  14.  * without express or implied warranty.
  15.  *
  16.  * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
  17.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
  18.  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  19.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  20.  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
  21.  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  22.  */
  23.  
  24. #ifndef _MULTIBUFST_H_
  25. #define _MULTIBUFST_H_
  26.  
  27. /*
  28.  * Protocol requests constants and alignment values
  29.  * These would really be in Multi-Buffering's X.h and Xproto.h equivalents
  30.  */
  31.  
  32. #include "multibuf.h"
  33.  
  34. #if defined(__STDC__) && !defined(UNIXCPP)
  35. #define MbufGetReq(name,req,info) GetReq (name, req); \
  36.     req->reqType = info->codes->major_opcode; \
  37.     req->mbufReqType = X_##name;
  38. #else
  39. #define MbufGetReq(name,req,info) GetReq (name, req); \
  40.     req->reqType = info->codes->major_opcode; \
  41.     req->mbufReqType = X_/**/name;
  42. #endif
  43.  
  44. #define Multibuffer CARD32
  45.  
  46. typedef struct {
  47.     CARD32    visualID B32;        /* associated visual */
  48.     CARD16    maxBuffers B16;        /* maximum supported buffers */
  49.     CARD8    depth;            /* depth of visual (redundant) */
  50.     CARD8    unused;
  51. } xMbufBufferInfo;
  52. #define sz_xMbufBufferInfo 8
  53.  
  54. typedef struct {
  55.     BYTE    type;
  56.     BYTE    unused;
  57.     CARD16  sequenceNumber B16;
  58.     CARD32  buffer B32;            /* affected buffer */
  59.     BYTE    state;            /* current status */
  60.     CARD8   unused1;
  61.     CARD16  unused2 B16;
  62.     CARD32  unused3 B32;
  63.     CARD32  unused4 B32;
  64.     CARD32  unused5 B32;
  65.     CARD32  unused6 B32;
  66.     CARD32  unused7 B32;
  67. } xMbufClobberNotifyEvent;
  68.  
  69. typedef struct {
  70.     BYTE    type;
  71.     BYTE    unused;
  72.     CARD16  sequenceNumber B16;
  73.     CARD32  buffer B32;            /* affected buffer */
  74.     CARD32  timeStamp B32;        /* update time */
  75.     CARD32  unused1 B32;
  76.     CARD32  unused2 B32;
  77.     CARD32  unused3 B32;
  78.     CARD32  unused4 B32;
  79.     CARD32  unused5 B32;
  80.     CARD32  unused6 B32;
  81. } xMbufUpdateNotifyEvent;
  82.  
  83. typedef struct {
  84.     CARD8    reqType;        /* always codes->major_opcode */
  85.     CARD8    mbufReqType;        /* always X_MbufGetBufferVersion */
  86.     CARD16    length B16;
  87. } xMbufGetBufferVersionReq;
  88. #define sz_xMbufGetBufferVersionReq    4
  89.  
  90. typedef struct {
  91.     BYTE    type;            /* X_Reply */
  92.     CARD8    unused;            /* not used */
  93.     CARD16    sequenceNumber B16;
  94.     CARD32    length B32;
  95.     CARD8    majorVersion;    /* major version of Multi-Buffering protocol */
  96.     CARD8    minorVersion;    /* minor version of Multi-Buffering protocol */
  97.     CARD16    pad1 B16;
  98.     CARD32    pad2 B32;
  99.     CARD32    pad3 B32;
  100.     CARD32    pad4 B32;
  101.     CARD32    pad5 B32;
  102.     CARD32    pad6 B32;
  103. } xMbufGetBufferVersionReply;
  104. #define sz_xMbufGetBufferVersionReply    32
  105.  
  106. typedef struct {
  107.     CARD8    reqType;    /* always codes->major_opcode */
  108.     CARD8    mbufReqType;    /* always X_MbufCreateImageBuffers */
  109.     CARD16    length B16;
  110.     CARD32    window B32;    /* associated window */
  111.     CARD8    updateAction;    /* action at update */
  112.     CARD8    updateHint;    /* hint as to frequency of updates */
  113.     CARD16    unused;
  114. } xMbufCreateImageBuffersReq;    /* followed by buffer ids */
  115. #define sz_xMbufCreateImageBuffersReq    12
  116.  
  117. typedef struct {
  118.     BYTE    type;            /* X_Reply */
  119.     CARD8    unused;            /* not used */
  120.     CARD16    sequenceNumber B16;
  121.     CARD32    length B32;
  122.     CARD16    numberBuffer B16;    /* number successfully allocated */
  123.     CARD16    unused1 B16;
  124.     CARD32    unused2 B32;
  125.     CARD32    unused3 B32;
  126.     CARD32    unused4 B32;
  127.     CARD32    unused5 B32;
  128.     CARD32    unused6 B32;
  129. } xMbufCreateImageBuffersReply;
  130. #define sz_xMbufCreateImageBuffersReply 32
  131.  
  132. typedef struct {
  133.     CARD8    reqType;    /* always codes->major_opcode */
  134.     CARD8    mbufReqType;    /* always X_MbufDestroyImageBuffers */
  135.     CARD16    length B16;
  136.     CARD32    window B32;    /* associated window */
  137. } xMbufDestroyImageBuffersReq;
  138. #define sz_xMbufDestroyImageBuffersReq    8
  139.  
  140. typedef struct {
  141.     CARD8    reqType;    /* always codes->major_opcode */
  142.     CARD8    mbufReqType;    /* always X_MbufDisplayImageBuffers */
  143.     CARD16    length B16;
  144.     CARD16    minDelay B16;    /* minimum time between last update and now */
  145.     CARD16    maxDelay B16;    /* maximum time between last update and now */
  146. } xMbufDisplayImageBuffersReq;    /* followed by list of buffers */
  147. #define sz_xMbufDisplayImageBuffersReq    8
  148.  
  149. typedef struct {
  150.     CARD8    reqType;    /* always codes->major_opcode */
  151.     CARD8    mbufReqType;    /* always X_MbufSetMBufferAttributes */
  152.     CARD16    length B16;
  153.     CARD32    window B32;    /* associated window */
  154.     CARD32    valueMask B32;    /* modified entries */
  155. } xMbufSetMBufferAttributesReq;    /* followed by values */
  156. #define sz_xMbufSetMBufferAttributesReq 12
  157.  
  158. typedef struct {
  159.     CARD8    reqType;    /* always codes->major_opcode */
  160.     CARD8    mbufReqType;    /* always X_MbufGetMBufferAttributes */
  161.     CARD16    length B16;
  162.     CARD32    window B32;    /* associated window */
  163. } xMbufGetMBufferAttributesReq;
  164. #define sz_xMbufGetMBufferAttributesReq 8
  165.  
  166. typedef struct {
  167.     BYTE    type;            /* X_Reply */
  168.     CARD8    unused;            /* not used */
  169.     CARD16    sequenceNumber B16;
  170.     CARD32    length B32;
  171.     CARD16    displayedBuffer B16;    /* currently visible buffer */
  172.     CARD8    updateAction;
  173.     CARD8    updateHint;
  174.     CARD8    windowMode;
  175.     CARD8    unused0;
  176.     CARD16    unused1 B16;
  177.     CARD32    unused2 B32;
  178.     CARD32    unused3 B32;
  179.     CARD32    unused4 B32;
  180.     CARD32    unused5 B32;
  181. } xMbufGetMBufferAttributesReply;
  182. #define sz_xMbufGetMBufferAttributesReply 32
  183.  
  184. typedef struct {
  185.     CARD8    reqType;    /* always codes->major_opcode */
  186.     CARD8    mbufReqType;    /* always X_MbufSetBufferAttributes */
  187.     CARD16    length B16;
  188.     CARD32    buffer B32;
  189.     CARD32    valueMask B32;
  190. } xMbufSetBufferAttributesReq;    /* followed by values */
  191. #define sz_xMbufSetBufferAttributesReq 12
  192.  
  193. typedef struct {
  194.     CARD8    reqType;    /* always codes->major_opcode */
  195.     CARD8    mbufReqType;    /* always X_MbufGetBufferAttributes */
  196.     CARD16    length B16;
  197.     CARD32    buffer B32;
  198. } xMbufGetBufferAttributesReq;
  199. #define sz_xMbufGetBufferAttributesReq 8
  200.  
  201. typedef struct {
  202.     BYTE    type;            /* X_Reply */
  203.     CARD8    unused;            /* not used */
  204.     CARD16    sequenceNumber B16;
  205.     CARD32    length B32;
  206.     CARD32    window B32;
  207.     CARD32    eventMask B32;
  208.     CARD16    bufferIndex B16;
  209.     CARD8    side;
  210.     CARD8    unused0;
  211.     CARD32    unused1 B32;
  212.     CARD32    unused2 B32;
  213.     CARD32    unused3 B32;
  214. } xMbufGetBufferAttributesReply;
  215. #define sz_xMbufGetBufferAttributesReply 32
  216.  
  217. typedef struct {
  218.     CARD8    reqType;    /* always codes->major_opcode */
  219.     CARD8    mbufReqType;    /* always X_MbufGetBufferInfo */
  220.     CARD16    length B16;
  221.     Drawable    drawable B32;
  222. } xMbufGetBufferInfoReq;
  223. #define sz_xMbufGetBufferInfoReq 8
  224.  
  225. typedef struct {
  226.     BYTE    type;            /* X_Reply */
  227.     CARD8    unused;            /* not used */
  228.     CARD16    sequenceNumber B16;
  229.     CARD32    length B32;
  230.     CARD16    normalInfo B16;
  231.     CARD16    stereoInfo B16;
  232.     CARD32    unused1 B32;
  233.     CARD32    unused2 B32;
  234.     CARD32    unused3 B32;
  235.     CARD32    unused4 B32;
  236.     CARD32    unused5 B32;
  237. } xMbufGetBufferInfoReply;            /* followed by buffer infos */
  238. #define sz_xMbufGetBufferInfoReply 32
  239.  
  240.  
  241. typedef struct {
  242.     CARD8    reqType;    /* always codes->major_opcode */
  243.     CARD8    mbufReqType;    /* always X_MbufCreateStereoWindow */
  244.     CARD16    length B16;
  245.     CARD8    unused0;
  246.     CARD8    unused1;
  247.     CARD8    unused2;
  248.     CARD8    depth;
  249.     Window    wid B32;
  250.     Window    parent B32;
  251.     Multibuffer    left B32;    /* associated buffers */
  252.     Multibuffer    right B32;
  253.     INT16    x B16;
  254.     INT16    y B16;
  255.     CARD16    width B16;
  256.     CARD16    height B16;
  257.     CARD16    borderWidth B16;  
  258.     CARD16    class B16;
  259.     VisualID    visual B32;
  260.     CARD32    mask B32;
  261. } xMbufCreateStereoWindowReq;        /* followed by value list */
  262. #define sz_xMbufCreateStereoWindowReq 44
  263.  
  264.  
  265. #undef Multibuffer
  266.  
  267. #endif /* _MULTIBUFST_H_ */
  268.